<?php

class Application_Model_SystemGateway {

    private $restClient;
    private $prefix = "/dbusMethod";    
    public function __construct() {
        $this->initiateConnection();
    }
    
    private function initiateConnection() {
	 # host i port from config file
         $this->restClient = new Zend_Rest_Client("http://localhost:8180");
    }
    
    private function makeRequest($req) {
	$response = $this->restClient->restGet($this->prefix . $req);
	return $response->getBody();
    }

    public function getNewUSBHubs($devID = "") {
	return $this->makeRequest("/getNewUSBHubs");
    }
    
    public function markHubInstalled($devID) {
	return $this->makeRequest("/markHubInstalled/$devID");
    }

    public function markHubAwaiting($devID) {
        return $this->makeRequest("/markHubAwaiting/$devID");
    }

}

?>
